//
//  tablTableViewCell.m
//  shuilijuOASystem
//
//  Created by michael on 16/7/1.
//  Copyright © 2016年 czd. All rights reserved.
//

#import "tablTableViewCell.h"

@implementation tablTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
 self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
 if (self) {
          self.selectionStyle = UITableViewCellSelectionStyleNone;

   _label = [[UILabel alloc]initWithFrame:CGRectZero];
   //CGRectMake(10, 0, 80, self.contentView.height)];
    _label.font = [UIFont systemFontOfSize:16];
//    _label.backgroundColor= [UIColor redColor];
    [self.contentView addSubview:_label];
    _label1 = [[UILabel alloc]init];
//    _label1.backgroundColor= [UIColor yellowColor];
    _label1.frame = CGRectZero;
           _label1.numberOfLines = 0;
      [_label1 setFont:[UIFont systemFontOfSize:13]];
       [self.contentView addSubview:_label1];

}

    return self;

}


- (void)layoutSubviews
{
[super layoutSubviews];
  CGFloat  titlesize  = [OAToolBox sizebyText:_data font:13 minsWidth:KScreenWidth-100];
    
// _label1.backgroundColor = [UIColor yellowColor];
 if(titlesize-50>60){
  _label.frame = CGRectMake(0, (titlesize-50)/2-25, 80, 50);
_label1.frame = CGRectMake(_label.right, 0, KScreenWidth-100,titlesize-50);

 }
 else{
  _label.frame = CGRectMake(0, 0, 80, 50);
_label1.frame = CGRectMake(_label.right, 0, KScreenWidth-100,60);

 
 }
 
    _label.text = [NSString stringWithFormat:@"%@ :",_week];

        _label1.text = _data;

}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
